package com.pptv.mtbu.ottflow.action;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import com.opensymphony.xwork2.*;
import org.apache.struts2.interceptor.*;


import com.pptv.mtbu.ottflow.action.base.AdminBaseAction;
import com.pptv.mtbu.ottflow.domain.*;



public class AddUserAction extends AdminBaseAction
{

	private User user;
	
	private String tip;
	public void setUser(User user)
	{
		this.user = user;
	}
	public User getUser()
	{
		return this.user;
	}


	public void setTip(String tip)
	{
		this.tip = tip;
	}
	public String getTip()
	{
		return this.tip;
	}

	public String execute()
		throws Exception
	{
	
		ActionContext ctx = ActionContext.getContext();
	
		String usr = (String)ctx.getSession()
			.get(WebConstant.USER);
	
		mgr.addUsr(user);
		setTip("增加一个用户");
		return SUCCESS;
	}

}